package com.yanqu.road.entity.systemgroup.newmonopolymarket.resgrab;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.player.UserBaseInfo;

@FieldTypeAnnotation(tableName = "t_u_new_monopoly_market_report_data")
public class NewMonopolyMarketReportData extends DataObject {

    @FieldTypeAnnotation(select = true, update = true)
    private long userId;

    @FieldTypeAnnotation(desc = "每周", update = true, select = true)
    private int weekId;

    @FieldTypeAnnotation(desc = "资源分组id")
    private int resGroupId;

    @FieldTypeAnnotation(desc = "资源类型")
    private int type;

    @FieldTypeAnnotation(desc = "占领 位置id")
    private int posIndex;

    @FieldTypeAnnotation(desc = "强夺者id")
    private long robId;

    @FieldTypeAnnotation(desc = "是否胜利")
    private boolean isWin;

    @FieldTypeAnnotation(desc = "抢夺时间 s")
    private int time;

    @FieldTypeAnnotation(desc = "攻击类型，0：搜索；2：挑战")
    private int actionType;

    @FieldTypeAnnotation(desc = "抢夺者基本信息")
    private UserBaseInfo robInfo = new UserBaseInfo();

    public long getUserId() {
        return userId;
    }
    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public int getWeekId() {
        return weekId;
    }

    public void setWeekId(int weekId) {
        if(this.weekId != weekId) {
            this.weekId = weekId;
            setUpdateOption();
        }
    }

    public int getType() {
        return type;
    }
    public void setType(int type) {
        if (this.type != type) {
            this.type = type;
            setOp(DataStatus.Update);
        }
    }

    public int getResGroupId() {
        return resGroupId;
    }

    public void setResGroupId(int resGroupId) {
        if(this.resGroupId != resGroupId) {
            this.resGroupId = resGroupId;
            setUpdateOption();
        }
    }

    public int getPosIndex() {
        return posIndex;
    }
    public void setPosIndex(int posIndex) {
        if (this.posIndex != posIndex) {
            this.posIndex = posIndex;
            setOp(DataStatus.Update);
        }
    }

    public long getRobId() {
        return robId;
    }
    public void setRobId(long robId) {
        if (this.robId != robId) {
            this.robId = robId;
            setOp(DataStatus.Update);
        }
    }

    public boolean getIsWin() {
        return isWin;
    }
    public void setIsWin(boolean isWin) {
        if (this.isWin != isWin) {
            this.isWin = isWin;
            setOp(DataStatus.Update);
        }
    }

    public int getTime() {
        return time;
    }
    public void setTime(int time) {
        if (this.time != time) {
            this.time = time;
            setOp(DataStatus.Update);
        }
    }

    public int getActionType() {
        return actionType;
    }

    public void setActionType(int actionType) {
        if(this.actionType != actionType) {
            this.actionType = actionType;
            setUpdateOption();
        }
    }

    public UserBaseInfo getRobInfo() {
        return robInfo;
    }
    public void setRobInfo(UserBaseInfo robInfo) {
        if (null == robInfo){
            return;
        }
        if (this.robInfo == null || !this.robInfo.equals(robInfo)) {
            this.robInfo = robInfo;
            setOp(DataStatus.Update);
        }
    }

}